<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no" />
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>马思特暑假二年级课程</title>
    <link rel="stylesheet" href="{{ URL::asset('/') }}mastedu/second/css/swiper.css">
    <link rel="stylesheet" href="{{ URL::asset('/') }}mastedu/second/css/chuyi.css">
    <link href="{{ URL::asset('/') }}mastedu/second/css/weui.min.css" rel="stylesheet" />
    <script type="text/javascript">
        //原理是在微信易信执行Ready之前，先注册事件，所以放在所有请求的最前面
        document.addEventListener("WeixinJSBridgeReady", function () {
            audioAutoPlay();//给个全局函数
        }, false);
        document.addEventListener('YixinJSBridgeReady', function () {
            audioAutoPlay();//给个全局函数
        }, false);
    </script>
</head>
<body>

    <div class="index-box">

        <!--音乐播放class="play zxhh"-->
        <div class="play zxhh">
            <audio id="Jaudio" class="media-audio" src="{{ URL::asset('/') }}mastedu/bg.mp3" preload loop="loop"></audio>
        </div>
        <!--头部-->
        <header class="title-box">
            <img class="enroll-logo" style="padding-top:.15rem; margin-left:.15rem;" src="{{ URL::asset('/') }}mastedu/second/pic/logo.png" alt="">
            <img class="enroll-title" src="{{ URL::asset('/') }}mastedu/second/pic/enroll-title.png" alt="">
            <img class="book3-rtop" src="{{ URL::asset('/') }}mastedu/second/pic/book3-rtop.png" alt="">
            <img class="book4-tmiddle" src="{{ URL::asset('/') }}mastedu/second/pic/book4-tmiddle.png" alt="">
            <!--title-->
            <div class="draw-subtitle">
                <img src="{{ URL::asset('/') }}mastedu/second/pic/index-subtitle.png" alt="">
            </div>
        </header>

        <div class="index-price">
            <img class="img-index-price" src="{{ URL::asset('/') }}mastedu/second/pic/index-price.png" alt="">
            <p class="index-price-tip"><span>*入班后每科仅收取90元学杂费</span></p>

            <!--悬浮按钮-->
            <a href="/mastedu/enroll/yellow?appid={{$appid}}&token={{$token}}&grade=2" class="btn-go-sign">立即抢占学位</a>
            <div id="fixed_nav_box2"></div>

        </div>

        <div class="index-godraw-box">

            <img src="{{ URL::asset('/') }}mastedu/second/pic/index-godraw-title.png" alt="">

            <div class="img-lesson-box clear">
                <a href="/mastedu/kcap.png">
                    <img src="{{ URL::asset('/') }}mastedu/second/pic/index-lesson.png" alt="">
                </a>

                <!--10大理由按钮-->
                <a href="/mastedu/brand/intro?appid={{$appid}}&token={{$token}}">
                    <img src="{{ URL::asset('/') }}mastedu/second/pic/index-fuwu.png" alt="">
                </a>
            </div>

            <a href="/mastedu/turntable/lottery?appid={{$appid}}&token={{$token}}"><img class="btn-index-godraw" src="{{ URL::asset('/') }}mastedu/second/pic/index-gowraw.png" alt=""></a>
        </div>

        <!--悬浮内内容-->
        <div class="index-main">

            <div id="fixed_nav_box"></div>

            <!--暑假班课程介绍-->
            <img class="index-lesson-jieshao" src="{{ URL::asset('/') }}mastedu/second/pic/lesson-jieshao.png" alt="">

            <!--课程内容简介-->
            <div class="index-lesson-content">
                <img class="img-lesson-ctitle" src="{{ URL::asset('/') }}mastedu/second/pic/lesson-content-title.png" alt="">
                <div class="index-lesson-title">

                </div>
                <div class="swiper-lesson-box">
                    <div class="swiper-container swiper-lesson">
                        <div class="swiper-wrapper">
                            <div class="swiper-slide">
                                <a href="http://www.yun61.com/mschool-26135/document-id-3686397.html"><img src="{{ URL::asset('/') }}mastedu/second/pic/lesson-yuwen.png" alt="语文"></a>
                            </div>
                            <div class="swiper-slide">
                                <a href="http://www.yun61.com/mschool-26135/document-id-3686380.html"><img src="{{ URL::asset('/') }}mastedu/second/pic/lesson-shuxue.png" alt="数学"></a>
                            </div>
                        </div>
                    </div>
                    <!--分页器-->
                    <div class="swiper-pagination"></div>
                </div>
            </div>

            <!--课程体系-->
            <img class="index-lesson-jieshao" src="{{ URL::asset('/') }}mastedu/second/pic/index-tixi.png" alt="">

            <div class="index-lesson-content index-tese-box">
                <img class="img-lesson-ctitle" src="{{ URL::asset('/') }}mastedu/second/pic/index-tese-title.png" alt="">
                <img src="{{ URL::asset('/') }}mastedu/second/pic/index-six.png" alt="">
            </div>

        </div>

        <div class="index-fix-btn">
            <a class="index-go-signup" href="/mastedu/enroll/yellow?appid={{$appid}}&token={{$token}}&grade=2">立即报名</a>
        </div>

    </div>

    <script src="{{ URL::asset('/') }}mastedu/js/jquery-3.1.1.min.js"></script>
    <script src="{{ URL::asset('/') }}mastedu/js/swiper.js"></script>
    <script src="{{ URL::asset('/') }}mastedu/js/font.js"></script>
    <script src="{{ URL::asset('/') }}mastedu/js/publib.js"></script>
    <script src="{{ URL::asset('/') }}mastedu/js/music.js"></script>
    <script src="{{ URL::asset('/') }}mastedu/js/jweixin-1.2.0.js"></script>

    @include('mastedu.share')
    <script>

        var mySwiper = new Swiper('.swiper-lesson', {
            pagination: '.swiper-pagination',
            slidesPerView: "1.3",
            spaceBetween: 10,
            paginationClickable: true,
            grabCursor: true,
            loop: true,
            //        centeredSlides : true,
            //        initialSlide :3,
            // centeredSlides:true
            // autoplay : 2000,
            autoplayDisableOnInteraction: false
        });

        // 按钮悬浮
        $(document).ready(function () {
            var $window = $(window),
                $mainMenuBar = $(".index-fix-btn"),
                $mainMenuBarAnchor = $('#fixed_nav_box2');
            $window.scroll(function () {
                var window_top = $window.scrollTop();

                var div_top = $mainMenuBarAnchor.offset().top;
                if (window_top > div_top) {
                    $('.index-fix-btn').addClass("index-fixed-btn");
                    $mainMenuBarAnchor.height($mainMenuBar.height());
                }
                else {
                    $('.index-fix-btn').removeClass("index-fixed-btn");
                    $mainMenuBarAnchor.height(0);
                }
            });
        });

        function audioAutoPlay() {//全局控制播放函数
            var audio = document.getElementById("Jaudio"),
                play = function () {
                    audio.play();
                    document.removeEventListener("touchstart", play, false);
                };
            audio.play();
            document.addEventListener("touchstart", play, false);
        }

        var isAppInside = /micromessenger/i.test(navigator.userAgent.toLowerCase()) || /yixin/i.test(navigator.userAgent.toLowerCase());
        if (!isAppInside) {//给非微信易信浏览器
            audioAutoPlay();
        }
    </script>

</body>
</html>